package com.cgq.pro.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.cgq.base.dao.impl.BaseDaoImpl;
import com.cgq.pro.dao.LoginDao;
import com.cgq.pro.entity.User;

@Repository
public class LoginDaoImpl extends BaseDaoImpl<User> implements LoginDao {

	public boolean isExitUser(User user) {
		String hql="from User o where o.name='"+user.getName()
				+"' and o.password='"+user.getPassword()+"'";
		List list=hibernateTemplate.find(hql);
		if(list.size()>0)
			return true;
		return false;
	}
	
}
